var express = require('express');
var router = express.Router();
var mysql = require('../mysql');


router.get('/', async (req, res, next) => {
  let { id } = req.query
  let result = await mysql.query({
    sql: 'SELECT * FROM `user` WHERE user_id = ?',
    value: [ id ]
  })
  res.json(result);
});

module.exports = router;
